package com.yuyue.springFramework.note01.entity;

/**
 * 静态工厂
 */
public class StaticFactory {
    //私有化构造方法
    private StaticFactory(){
        System.out.println("实例化静态工厂StaticFactory");
    }
    //创建当前类的私有化对象
    private static StaticFactory staticFactory = new StaticFactory();

    public static StaticFactory getStaticFactory(){
        //返回唯一的私有化对象
        return staticFactory;
    }
}
